<template>
	<view>
		<swiper class="swiper" circular indicator-dots autoplay="autoplay" interval="2000" duration="500"
			indicator-active-color="yellow">
			<swiper-item v-for="item in images" :key="item.banner_pk">
				<image :src="item.banner_img" mode="scaleToFill" class="swiper-item"></image>
			</swiper-item>
		</swiper>
	</view>
	<index-plant1 name="学院新闻"></index-plant1>
</template>

<script lang="ts" setup>
	import ajax from "../util/request";
	import IndexPlant1 from "../../components/index/index-plant1.vue"
	import {
		reactive,
		
	} from "vue";
	const images = reactive([])
	ajax("banner/queryList", {
		"t_cat_fk": 5
	}).then((res: any) => {
		// console.log(res)
		if (res.data.status > 0) {
			// images.length = 0,
			images.push(...res.data.result_data)
		}
	})
	
	uni.setStorage({
		key:"loginUser1",
		data:{name:"tom",age:18}
		
	})
</script>

<style>
	.swiper {
		height: 300rpx;
	}

	.swiper-item {
		width: 100%;
		height: 300rpx;
	}
</style>
